package com.smag.web.controller.farming;

import com.smag.common.annotation.Anonymous;
import com.smag.common.core.domain.AjaxResult;
import com.smag.system.service.FarmCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/category")
public class CategoryController {

    @Autowired
    private FarmCategoryService farmcategoryService;

    @Anonymous
    @RequestMapping("/getCategoryList")
    public AjaxResult getCategoryList() {
        return farmcategoryService.getCategoryList();
    }
    @Anonymous
    @RequestMapping("/getRootCategoryList")
    public AjaxResult getRootCategoryList(){
        return farmcategoryService.getRootCategoryList();
    }
}